package com.zhonghui.dolo.manager.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/")
public class WebController {

    @RequestMapping("/mgr/{pageName}.html")
    public ModelAndView toPage(@PathVariable("pageName") String pageName, ModelAndView modelAndView) {
        modelAndView.setViewName("WEB-INF/" + pageName);
        return modelAndView;
    }

    @RequestMapping("/page/{pageName}.html")
    public ModelAndView toPageV2(@PathVariable("pageName") String pageName, ModelAndView modelAndView) {
        modelAndView.setViewName("WEB-INF/" + pageName);
        return modelAndView;
    }
}
